package com.coin.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.coin.domain.*;
import com.baomidou.mybatisplus.extension.service.IService;
import com.coin.vo.*;

/**
 * @author 李力
 * @description 针对表【cash_recharge(充值表)】的数据库操作Service
 * @createDate 2025-06-12 10:12:53
 */
public interface CashRechargeService extends IService<CashRecharge> {

    /**
     * @Description: 条件分页查询
     * @Author: 李 力
     * @Date: 2025/6/13
     * @Param:
     * @return: R
     */
    Page<CashRecharge> findByPage(Page<CashRecharge> page, Long coinId, Long userId, String userName, String mobile, Byte status, String numMin, String numMax, String startTime, String endTime);

    /**
     * @Description: GCN的充值操作
     * @Author: 李 力
     * @Date: 2025/6/13
     * @Param:
     * @return: R
     */
    CashTradeVo buy(Long userId, CashParam cashParam);

    /**
     * @Description: 现金充值审核
     * @Author: 李 力
     * @Date: 2025/6/16
     * @Param:
     * @return: R
     */
    boolean cashRechargeUpdateStatus(Long userId, CashRechargeAuditRecord auditRecord);

    /**
     * @Description: 查询当前用户的充值记录
     * @Author: 李 力
     * @Date: 2025/6/19
     * @Param:
     * @return: R
     */
    Page<CashRecharge> findUserCashRecharge(Page<CashRecharge> page, Long userId, Byte status);
}
